package com.onlinemovies.entity;

import java.io.Serializable;
import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


@Entity
@Table(name="MovieDetails")
public class MovieDetails implements Serializable {
	
	  private static final long serialVersionUID = 1L;
	     
	    @Id
	    @GeneratedValue(strategy=GenerationType.AUTO)
	    @Column(name="id")
	    private long id;
	   
	    @Column(name="moviename")
	    private String moviename;
	    
	    public HallDetails getHallDetails() {
			return hallDetails;
		}


		public void setHallDetails(HallDetails hallDetails) {
			this.hallDetails = hallDetails;
		}


		@Column(name="cast")
	    private String cast;
	    
	    @Column(name="language")
	    private String language;
	    
	    @Column(name="otherdetails")
	    private String otherdetails;

	    
	    @Column(name="status")
	    private String status;
	    
	    @JoinColumn(name = "locationid", referencedColumnName = "id")
	    @ManyToOne
	    private HallDetails hallDetails;



	    //@OneToMany(cascade = CascadeType.ALL, mappedBy = "movieDetails")
		//private Collection<ShowDetails> showDetailscollection;

		public long getId() {
			return id;
		}


		public void setId(long id) {
			this.id = id;
		}


		public String getMoviename() {
			return moviename;
		}


		public void setMoviename(String moviename) {
			this.moviename = moviename;
		}


		public String getCast() {
			return cast;
		}


		public void setCast(String cast) {
			this.cast = cast;
		}


		public String getLanguage() {
			return language;
		}


		public void setLanguage(String language) {
			this.language = language;
		}


		public String getOtherdetails() {
			return otherdetails;
		}


		public void setOtherdetails(String otherdetails) {
			this.otherdetails = otherdetails;
		}


		public String getStatus() {
			return status;
		}


		public void setStatus(String status) {
			this.status = status;
		}

}
